﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
using UCL.Data;

namespace UAS5
{
    /// <summary>
    /// 2013-6-6 by sutroon
    /// </summary>
    class AppDataHelper : SQLiteHelper
    {
        public AppDataHelper()
            : base("Data Source=QuickDialDB.db;Pooling=true;FailIfMissing=false")
        {
            // 通用分类
            base.ExecuteNonQuery("create table if not exists tgeneralcatalog (ID INTEGER PRIMARY KEY, Name text,Content text,ExTags text,Ordinal smallint not null default 999, CreatedTime DateTime not null default CURRENT_TIMESTAMP,SiteTag text)");

            // 快速拨号
            base.ExecuteNonQuery("create table if not exists tquickdial (ID INTEGER PRIMARY KEY, Name text, Paths text, IconPath text, Remark text, Tags text, Ordinal smallint not null default 999, CreatedTime DateTime not null default CURRENT_TIMESTAMP)");

            // 应用程序收藏夹
            base.ExecuteNonQuery("create table if not exists tAppFavorite (_id INTEGER PRIMARY KEY, Name text, Path text, IconPath text, Tags text, Ordinal smallint not null default 999, CreatedTime DateTime not null default CURRENT_TIMESTAMP)");
        }
    }
}
